def isPrime(n):
    i = 2;
    while n<=1:
        return False;
    while i * i <= n:
        if n%i==0:
            return False;
        i = i + 1;
    return True;
       
    
        
def countPrime(n):
    count=0;
    for i in range(0,n):
        if isPrime(i):
            count = count + 1;
    return count;

n = 1000000;
print(countPrime(n));

    
    
    
    







